<?php
namespace Ext;
class RandCreateUserInfo
{
    private $arrXing,$numbXing,$arrMing,$numbMing;
    private $province_arr = array('安徽','北京','重庆','福建','甘肃','广东','广西','贵州','海南','河北','黑龙江','河南','香港','湖北','湖南','江苏','江西','吉林','辽宁','澳门','内蒙古','宁夏','青海','山东','上海','山西','陕西','四川','台湾','天津','新疆','西藏','云南','浙江');
    private $city_arr = array (
        '安徽' => array (0 => '合肥',1 => '安庆',3 => '蚌埠',5 => '亳州',7 => '巢湖',9 => '滁州',11 => '阜阳',13 => '贵池',15 => '淮北',17 => '淮化',19 => '淮南',21 => '黄山',23 => '九华山',25 => '六安',27 => '马鞍山',29 => '宿州',31 => '铜陵',33 => '屯溪',35 => '芜湖',37 => '宣城',),
        '北京' => array (0 => '东城',1 => '西城',3 => '崇文',5 => '宣武',7 => '朝阳',9 => '丰台',11 => '石景山',13 => '海淀',15 => '门头沟',17 => '房山',19 => '通州',21 => '顺义',23 => '昌平',25 => '大兴',27 => '平谷',29 => '怀柔',31 => '密云',33 => '延庆',),
        '重庆' => array (0 => '万州',2 => '涪陵',4 => '渝中',6 => '大渡口',8 => '江北',10 => '沙坪坝',12 => '九龙坡',14 => '南岸',16 => '北碚',18 => '万盛',20 => '双挢',22 => '渝北',24 => '巴南',26 => '黔江',28 => '长寿',30 => '綦江',32 => '潼南',34 => '铜梁',36 => '大足',38 => '荣昌',40 => '壁山',42 => '梁平',44 => '城口',46 => '丰都',48 => '垫江',50 => '武隆',52 => '忠县',54 => '开县',56 => '云阳',58 => '奉节',60 => '巫山',62 => '巫溪',64 => '石柱',66 => '秀山',68 => '酉阳',70 => '彭水',72 => '江津',74 => '合川',76 => '永川',78 => '南川',),
        '福建' => array (0 => '福州',1 => '福安',3 => '龙岩',5 => '南平',7 => '宁德',9 => '莆田',11 => '泉州',13 => '三明',15 => '邵武',17 => '石狮',19 => '晋江',21 => '永安',23 => '武夷山',25 => '厦门',27 => '漳州',),
        '甘肃' => array (0 => '兰州',1 => '白银',3 => '定西',5 => '敦煌',7 => '甘南',9 => '金昌',11 => '酒泉',13 => '临夏',15 => '平凉',17 => '天水',19 => '武都',21 => '武威',23 => '西峰',25 => '嘉峪关',27 => '张掖',),
        '广东' => array (0 => '广州',1 => '潮阳',3 => '潮州',5 => '澄海',7 => '东莞',9 => '佛山',11 => '河源',13 => '惠州',15 => '江门',17 => '揭阳',19 => '开平',21 => '茂名',23 => '梅州',25 => '清远',27 => '汕头',29 => '汕尾',31 => '韶关',33 => '深圳',35 => '顺德',37 => '阳江',39 => '英德',41 => '云浮',43 => '增城',45 => '湛江',47 => '肇庆',49 => '中山',51 => '珠海',),
        '广西' => array (0 => '南宁',1 => '百色',3 => '北海',5 => '桂林',7 => '防城港',9 => '河池',11 => '贺州',13 => '柳州',15 => '来宾',17 => '钦州',19 => '梧州',21 => '贵港',23 => '玉林',),
        '贵州' => array (0 => '贵阳',1 => '安顺',3 => '毕节',5 => '都匀',7 => '凯里',9 => '六盘水',11 => '铜仁',13 => '兴义',15 => '玉屏',17 => '遵义',),
        '海南' => array (0 => '海口',1 => '三亚',3 => '五指山',5 => '琼海',7 => '儋州',9 => '文昌',11 => '万宁',13 => '东方',15 => '定安',17 => '屯昌',19 => '澄迈',21 => '临高',25 => '白沙黎族',27 => '昌江黎族',29 => '乐东黎族',31 => '陵水黎族',33 => '保亭黎族',35 => '琼中黎族',37 => '西沙群岛',39 => '南沙群岛',41 => '中沙群岛',),
        '河北' => array (0 => '石家庄',1 => '保定',3 => '北戴河',5 => '沧州',7 => '承德',9 => '丰润',11 => '邯郸',13 => '衡水',15 => '廊坊',17 => '南戴河',19 => '秦皇岛',21 => '唐山',23 => '新城',25 => '邢台',27 => '张家口',),
        '黑龙江' => array (0 => '哈尔滨',1 => '北安',3 => '大庆',5 => '大兴安岭',7 => '鹤岗',9 => '黑河',11 => '佳木斯',13 => '鸡西',15 => '牡丹江',17 => '齐齐哈尔',19 => '七台河',21 => '双鸭山',23 => '绥化',25 => '伊春',),
        '河南' => array (0 => '郑州',1 => '安阳',3 => '鹤壁',5 => '潢川',7 => '焦作',9 => '济源',11 => '开封',13 => '漯河',15 => '洛阳',17 => '南阳',19 => '平顶山',21 => '濮阳',23 => '三门峡',25 => '商丘',27 => '新乡',29 => '信阳',31 => '许昌',33 => '周口',35 => '驻马店',),
        '香港' => array (0 => '香港',1 => '九龙',3 => '新界',),
        '湖北' => array (0 => '武汉',1 => '恩施',3 => '鄂州',5 => '黄冈',7 => '黄石',9 => '荆门',11 => '荆州',13 => '潜江',15 => '十堰',17 => '随州',19 => '武穴',21 => '仙桃',23 => '咸宁',25 => '襄阳',27 => '襄樊',29 => '孝感',31 => '宜昌',),
        '湖南' => array (0 => '长沙',1 => '常德',3 => '郴州',5 => '衡阳',7 => '怀化',9 => '吉首',11 => '娄底',13 => '邵阳',15 => '湘潭',17 => '益阳',19 => '岳阳',21 => '永州',23 => '张家界',25 => '株洲',),
        '江苏' => array (0 => '南京',1 => '常熟',3 => '常州',5 => '海门',7 => '淮安',9 => '江都',11 => '江阴',13 => '昆山',15 => '连云港',17 => '南通',19 => '启东',21 => '沭阳',23 => '宿迁',25 => '苏州',27 => '太仓',29 => '泰州',31 => '同里',33 => '无锡',35 => '徐州',37 => '盐城',39 => '扬州',41 => '宜兴',43 => '仪征',45 => '张家港',47 => '镇江',49 => '周庄',),
        '江西' => array (0 => '南昌',1 => '抚州',3 => '赣州',5 => '吉安',7 => '景德镇',9 => '井冈山',11 => '九江',13 => '庐山',15 => '萍乡',17 => '上饶',19 => '新余',21 => '宜春',23 => '鹰潭',),
        '吉林' => array (0 => '长春',1 => '白城',3 => '白山',5 => '珲春',7 => '辽源',9 => '梅河',11 => '吉林',13 => '四平',15 => '松原',17 => '通化',19 => '延吉',),
        '辽宁' => array (0 => '沈阳',1 => '鞍山',3 => '本溪',5 => '朝阳',7 => '大连',9 => '丹东',11 => '抚顺',13 => '阜新',15 => '葫芦岛',17 => '锦州',19 => '辽阳',21 => '盘锦',23 => '铁岭',25 => '营口',),
        '澳门' => array (0 => '澳门',),
        '内蒙古' => array (0 => '呼和浩特',1 => '阿拉善盟',3 => '包头',5 => '赤峰',7 => '东胜',9 => '海拉尔',11 => '集宁',13 => '临河',15 => '通辽',17 => '乌海',19 => '乌兰浩特',21 => '锡林浩特',),
        '宁夏' => array (0 => '银川',1 => '固原',3 => '中卫',5 => '石嘴山',7 => '吴忠',),
        '青海' => array (0 => '西宁',1 => '德令哈',3 => '格尔木',5 => '共和',7 => '海东',9 => '海晏',11 => '玛沁',13 => '同仁',15 => '玉树',),
        '山东' => array (0 => '济南',1 => '滨州',3 => '兖州',5 => '德州',7 => '东营',9 => '菏泽',11 => '济宁',13 => '莱芜',15 => '聊城',17 => '临沂',19 => '蓬莱',21 => '青岛',23 => '曲阜',25 => '日照',27 => '泰安',29 => '潍坊',31 => '威海',33 => '烟台',35 => '枣庄',37 => '淄博',),
        '上海' => array (0 => '崇明',2 => '黄浦',4 => '卢湾',6 => '徐汇',8 => '长宁',10 => '静安',12 => '普陀',14 => '闸北',16 => '虹口',18 => '杨浦',20 => '闵行',22 => '宝山',24 => '嘉定',26 => '浦东',28 => '金山',30 => '松江',32 => '青浦',34 => '南汇',36 => '奉贤',38 => '朱家角',),
        '山西' => array (0 => '太原',1 => '长治',3 => '大同',5 => '候马',7 => '晋城',9 => '离石',11 => '临汾',13 => '宁武',15 => '朔州',17 => '忻州',19 => '阳泉',21 => '榆次',23 => '运城',),
        '陕西' => array (0 => '西安',1 => '安康',3 => '宝鸡',5 => '汉中',7 => '渭南',9 => '商州',11 => '绥德',13 => '铜川',15 => '咸阳',17 => '延安',19 => '榆林',),
        '四川' => array (0 => '成都',1 => '巴中',3 => '达州',5 => '德阳',7 => '都江堰',9 => '峨眉山',11 => '涪陵',13 => '广安',15 => '广元',17 => '九寨沟',19 => '康定',21 => '乐山',23 => '泸州',25 => '马尔康',27 => '绵阳',29 => '眉山',31 => '南充',33 => '内江',35 => '攀枝花',37 => '遂宁',39 => '汶川',41 => '西昌',43 => '雅安',45 => '宜宾',47 => '自贡',49 => '资阳',),
        '台湾' => array (0 => '台北',1 => '基隆',3 => '台南',5 => '台中',7 => '高雄',9 => '屏东',11 => '南投',13 => '云林',15 => '新竹',17 => '彰化',19 => '苗栗',21 => '嘉义',23 => '花莲',25 => '桃园',27 => '宜兰',29 => '台东',31 => '金门',33 => '马祖',35 => '澎湖',37 => '其它',),
        '天津' => array (0 => '天津',1 => '和平',3 => '东丽',5 => '河东',7 => '西青',9 => '河西',11 => '津南',13 => '南开',15 => '北辰',17 => '河北',19 => '武清',21 => '红挢',23 => '塘沽',25 => '汉沽',27 => '大港',29 => '宁河',31 => '静海',33 => '宝坻',35 => '蓟县',),
        '新疆' => array (0 => '乌鲁木齐',1 => '阿克苏',3 => '阿勒泰',5 => '阿图什',7 => '博乐',9 => '昌吉',11 => '东山',13 => '哈密',15 => '和田',17 => '喀什',19 => '克拉玛依',21 => '库车',23 => '库尔勒',25 => '奎屯',27 => '石河子',29 => '塔城',31 => '吐鲁番',33 => '伊宁',),
        '西藏' => array (0 => '拉萨',1 => '阿里',3 => '昌都',5 => '林芝',7 => '那曲',9 => '日喀则',11 => '山南',),
        '云南' => array (0 => '昆明',1 => '大理',3 => '保山',5 => '楚雄',9 => '东川',11 => '个旧',13 => '景洪',15 => '开远',17 => '临沧',19 => '丽江',21 => '六库',23 => '潞西',25 => '曲靖',27 => '思茅',29 => '文山',31 => '西双版纳',33 => '玉溪',35 => '中甸',37 => '昭通',),
        '浙江' => array (0 => '杭州',1 => '安吉',3 => '慈溪',5 => '定海',7 => '奉化',9 => '海盐',11 => '黄岩',13 => '湖州',15 => '嘉兴',17 => '金华',19 => '临安',21 => '临海',23 => '丽水',25 => '宁波',27 => '瓯海',29 => '平湖',31 => '千岛湖',33 => '衢州',35 => '江山',37 => '瑞安',39 => '绍兴',41 => '嵊州',43 => '台州',45 => '温岭',47 => '温州',49 => '余姚',51 => '舟山',),
    );
    function __construct()
    {
        $this->getXingList();
        $this->getMingList();
    }
    /* 获取姓列表 */
    private function getXingList()
    {
        $this->arrXing = array('赵','钱','孙','李','周','吴','郑','王','冯','陈','褚',
            '卫','蒋','沈','韩','杨','朱','秦','尤','许','何','吕','施','张','孔','曹','严',
            '华','金','魏','陶','姜','戚','谢','邹','喻','柏','水','窦','章','云','苏','潘',
            '葛','奚','范','彭','郎','鲁','韦','昌','马','苗','凤','花','方','任','袁','柳',
            '鲍','史','唐','费','薛','雷','贺','倪','汤','滕','殷','罗','毕','郝','安','常',
            '傅','卞','齐','元','顾','孟','平','黄','穆','萧','尹','姚','邵','湛','汪','祁','毛',
            '狄','米','伏','成','戴','谈','宋','茅','庞','熊','纪','舒','屈','项','祝','董','梁',
            '杜','阮','蓝','闵','季','贾','路','娄','江','童','颜','郭','梅','盛','林','钟','徐',
            '邱','骆','高','夏','蔡','田','樊','胡','凌','霍','虞','万','支','柯','管','卢','莫',
            '柯','房','裘','缪','解','应','宗','丁','宣','邓','单','杭','洪','包','诸','左','石',
            '崔','吉','龚','程','嵇','邢','裴','陆','荣','翁','荀','于','惠','甄','曲','封','储',
            '仲','伊','宁','仇','甘','武','符','刘','景','詹','龙','叶','幸','司','黎','溥','印',
            '怀','蒲','邰','从','索','赖','卓','屠','池','乔','胥','闻','莘','党','翟','谭','贡',
            '劳','逄','姬','申','扶','堵','冉','宰','雍','桑','寿','通','燕','浦','尚','农','温',
            '别','庄','晏','柴','瞿','阎','连','习','容','向','古','易','廖','庾','终','步','都',
            '耿','满','弘','匡','国','文','寇','广','禄','阙','东','欧','利','师','巩','聂','关',
            '荆','司马','上官','欧阳','夏侯','诸葛','闻人','东方','赫连','皇甫','尉迟','公羊','澹台',
            '公冶','宗政','濮阳','淳于','单于','太叔','申屠','公孙','仲孙','轩辕','令狐','徐离','宇文',
            '长孙','慕容','司徒','司空');
        $this->numbXing = count($this-> arrXing)-1;
    }
    private function getMingList()
    {
        $this->arrMing=array(
            '伟','刚','勇','毅','俊','峰','强','军','平','保','东','文','辉',
            '力','明','永','健','世','广','志','义','兴','良','海','山','仁',
            '波','宁','贵','福','生','龙','元','全','国','胜','学','祥','才',
            '发','武','新','利','清','飞','彬','富','顺','信','子','杰','涛',
            '昌','成','康','星','光','天','达','安','岩','中','茂','进','林',
            '有','坚','和','彪','博','诚','先','敬','震','振','壮','会','思',
            '群','豪','心','邦','承','乐','绍','功','松','善','厚','庆','磊',
            '民','友','裕','河','哲','江','超','浩','亮','政','谦','亨','奇',
            '固','之','轮','翰','朗','伯','宏','言','若','鸣','朋','斌','梁',
            '栋','维','启','克','伦','翔','旭','鹏','泽','晨','辰','士','以',
            '建','家','致','树','炎','德','行','时','泰','盛','雄','琛','钧',
            '冠','策','腾','楠','榕','风','航','弘','秀','娟','英','华','慧',
            '巧','美','娜','静','淑','惠','珠','翠','雅','芝','玉','萍','红',
            '娥','玲','芬','芳','燕','彩','春','菊','兰','凤','洁','梅','琳',
            '素','云','莲','真','环','雪','荣','爱','妹','霞','香','月','莺',
            '媛','艳','瑞','凡','佳','嘉','琼','勤','珍','贞','莉','桂','娣',
            '叶','璧','璐','娅','琦','晶','妍','茜','秋','珊','莎','锦','黛',
            '青','倩','婷','姣','婉','娴','瑾','颖','露','瑶','怡','婵','雁',
            '蓓','纨','仪','荷','丹','蓉','眉','君','琴','蕊','薇','菁','梦',
            '岚','苑','婕','馨','瑗','琰','韵','融','园','艺','咏','卿','聪',
            '澜','纯','毓','悦','昭','冰','爽','琬','茗','羽','希','欣','飘',
            '育','滢','馥','筠','柔','竹','霭','凝','晓','欢','霄','枫','芸',
            '菲','寒','伊','亚','宜','可','姬','舒','影','荔','枝','丽','阳',
            '妮','宝','贝','初','程','梵','罡','恒','鸿','桦','骅','剑','娇',
            '纪','宽','苛','灵','玛','媚','琪','晴','容','睿','烁','堂','唯',
            '威','韦','雯','苇','萱','阅','彦','宇','雨','洋','忠','宗','曼',
            '紫','逸','贤','蝶','菡','绿','蓝','儿','翠','烟');
        $this->numbMing = count($this-> arrMing)-1;
    }
    private function getXing()
    {
        return $this->arrXing[mt_rand(0,$this->numbXing)];
    }
    private function getMing()
    {
        return $this->arrMing[mt_rand(0,$this->numbMing)];
    }
    public function getName($type=0)
    {
        $name = '' ;
        switch($type)
        {
            case 1:
                //2字
                $name = $this->getXing().$this->getMing();
                break;
            case 2:
            //随机2、3个字
                $name = $this->getXing().$this->getMing();
                if(mt_rand (0,100)>50)$name .= $this->getMing();
                break;
            case 3:
                //只取姓
                $name = $this->getXing();
                break;
            case 4:
                //只取名
                $name = $this->getMing();
                break;
            default:
                //默认情况 1姓+2名
                $name = $this->getXing().$this->getMing().$this->getMing();
        }
        return $name;
    }
    //随机生成IP
    public function getIp()
    {
        return rand(1,255).'.'.rand(1,255).'.'.rand(1,255).'.'.rand(1,255);
    }
    //随机生成省市
    public function getCity($len=1)
    {
        $key = array_rand($this->province_arr,1);
        $r = $this->province_arr[$key];
        if($len>1)$r .= ' - '.$this->city_arr[$r][array_rand($this->city_arr[$r],1)];
        return $r;
    }
    //随机生成 中文字符
    private $simplified = "皑蔼碍爱翱袄奥坝罢摆败颁办绊帮绑镑谤剥饱宝报鲍辈贝钡狈备惫绷笔毕毙币闭边编贬变辩辫标鳖别瘪濒滨宾摈饼并拨钵铂驳卜补财参蚕残惭惨灿苍舱仓沧厕侧册测层诧搀掺蝉馋谗缠铲产阐颤场尝长偿肠厂畅钞车彻尘沉陈衬撑称惩诚骋痴迟驰耻齿炽冲虫宠畴踌筹绸丑橱厨锄雏础储触处传疮闯创锤纯绰辞词赐聪葱囱从丛凑蹿窜错达带贷担单郸掸胆惮诞弹当挡党荡档捣岛祷导盗灯邓敌涤递缔颠点垫电淀钓调迭谍叠钉顶锭订丢东动栋冻斗犊独读赌镀锻断缎兑队对吨顿钝夺堕鹅额讹恶饿儿尔饵贰发罚阀珐矾钒烦范贩饭访纺飞诽废费纷坟奋愤粪丰枫锋风疯冯缝讽凤肤辐抚辅赋复负讣妇缚该钙盖干赶秆赣冈刚钢纲岗皋镐搁鸽阁铬个给龚宫巩贡钩沟构购够蛊顾剐关观馆惯贯广规硅归龟闺轨诡柜贵刽辊滚锅国过骇韩汉号阂鹤贺横轰鸿红后壶护沪户哗华画划话怀坏欢环还缓换唤痪焕涣黄谎挥辉毁贿秽会烩汇讳诲绘荤浑伙获货祸击机积饥讥鸡绩缉极辑级挤几蓟剂济计记际继纪夹荚颊贾钾价驾歼监坚笺间艰缄茧检碱硷拣捡简俭减荐槛鉴践贱见键舰剑饯渐溅涧将浆蒋桨奖讲酱胶浇骄娇搅铰矫侥脚饺缴绞轿较秸阶节茎鲸惊经颈静镜径痉竞净纠厩旧驹举据锯惧剧鹃绢杰洁结诫届紧锦仅谨进晋烬尽劲荆觉决诀绝钧军骏开凯颗壳课垦恳抠库裤夸块侩宽矿旷况亏岿窥馈溃扩阔蜡腊莱来赖蓝栏拦篮阑兰澜谰揽览懒缆烂滥捞劳涝乐镭垒类泪篱离里鲤礼丽厉励砾历沥隶俩联莲连镰怜涟帘敛脸链恋炼练粮凉两辆谅疗辽镣猎临邻鳞凛赁龄铃凌灵岭领馏刘龙聋咙笼垄拢陇楼娄搂篓芦卢颅庐炉掳卤虏鲁赂禄录陆驴吕铝侣屡缕虑滤绿峦挛孪滦乱抡轮伦仑沦纶论萝罗逻锣箩骡骆络妈玛码蚂马骂吗买麦卖迈脉瞒馒蛮满谩猫锚铆贸么霉没镁门闷们锰梦谜弥觅幂绵缅庙灭悯闽鸣铭谬谋亩钠纳难挠脑恼闹馁内拟腻撵捻酿鸟聂啮镊镍柠狞宁拧泞钮纽脓浓农疟诺欧鸥殴呕沤盘庞赔喷鹏骗飘频贫苹凭评泼颇扑铺朴谱栖凄脐齐骑岂启气弃讫牵扦钎铅迁签谦钱钳潜浅谴堑枪呛墙蔷强抢锹桥乔侨翘窍窃钦亲寝轻氢倾顷请庆琼穷趋区躯驱龋颧权劝却鹊确让饶扰绕热韧认纫荣绒软锐闰润洒萨鳃赛叁伞丧骚扫涩杀纱筛晒删闪陕赡缮伤赏烧绍赊摄慑设绅审婶肾渗声绳胜圣师狮湿诗尸时蚀实识驶势适释饰视试寿兽枢输书赎属术树竖数帅双谁税顺说硕烁丝饲耸怂颂讼诵擞苏诉肃虽随绥岁孙损笋缩琐锁獭挞抬态摊贪瘫滩坛谭谈叹汤烫涛绦讨腾誊锑题体屉条贴铁厅听烃铜统头秃图涂团颓蜕脱鸵驮驼椭洼袜弯湾顽万网韦违围为潍维苇伟伪纬谓卫温闻纹稳问瓮挝蜗涡窝卧呜钨乌污诬无芜吴坞雾务误锡牺袭习铣戏细虾辖峡侠狭厦吓锨鲜纤咸贤衔闲显险现献县馅羡宪线厢镶乡详响项萧嚣销晓啸蝎协挟携胁谐写泻谢锌衅兴汹锈绣虚嘘须许叙绪续轩悬选癣绚学勋询寻驯训讯逊压鸦鸭哑亚讶阉烟盐严颜阎艳厌砚彦谚验鸯杨扬疡阳痒养样瑶摇尧遥窑谣药爷页业叶医铱颐遗仪彝蚁艺亿忆义诣议谊译异绎荫阴银饮隐樱婴鹰应缨莹萤营荧蝇赢颖哟拥佣痈踊咏涌优忧邮铀犹游诱舆鱼渔娱与屿语吁御狱誉预驭鸳渊辕园员圆缘远愿约跃钥岳粤悦阅云郧匀陨运蕴酝晕韵杂灾载攒暂赞赃脏凿枣灶责择则泽贼赠扎札轧铡闸栅诈斋债毡盏斩辗崭栈战绽张涨帐账胀赵蛰辙锗这贞针侦诊镇阵挣睁狰争帧郑证织职执纸挚掷帜质滞钟终种肿众诌轴皱昼骤猪诸诛烛瞩嘱贮铸筑驻专砖转赚桩庄装妆壮状锥赘坠缀谆着浊兹资渍踪综总纵邹诅组钻";
    public function getChinaCode($len)
    {
        $s_len = strlen($this->simplified);
        $str = '';
        for($i = 0; $i <=$len; $i++) {
            $r = rand(3,$s_len);
            if($r%3!=0)
            {
                $r--;
                if($r%3!=0)$r--;
            }
            $str .= substr($this->simplified,$r,3);
        }
        return $str;
    }
    public function getGuid() {
        $charid = strtoupper(md5(uniqid(mt_rand(), true)));
        $hyphen = '';//chr(45);// "-"
        $uuid = substr($charid, 0, 8).$hyphen
            .substr($charid, 8, 4).$hyphen
            .substr($charid,12, 4).$hyphen
            .substr($charid,16, 4).$hyphen
            .substr($charid,20,12);
        return $uuid;
    }
    public $country = array(
        array( // row #0
            'id' => 1,
            'name' => '法国',
            'isback' => 1,
            'tax_comm' => 20.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'F',
            'py' => '',
        ),
        array( // row #1
            'id' => 2,
            'name' => '德国',
            'isback' => 1,
            'tax_comm' => 19.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'D',
            'py' => '',
        ),
        array( // row #2
            'id' => 3,
            'name' => '意大利',
            'isback' => 1,
            'tax_comm' => 22.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'Y',
            'py' => '',
        ),
        array( // row #3
            'id' => 4,
            'name' => '英国',
            'isback' => 1,
            'tax_comm' => 20.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'Y',
            'py' => '',
        ),
        array( // row #4
            'id' => 5,
            'name' => '韩国',
            'isback' => 1,
            'tax_comm' => 10.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'H',
            'py' => '',
        ),
        array( // row #5
            'id' => 6,
            'name' => '奥地利',
            'isback' => 1,
            'tax_comm' => 20.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'A',
            'py' => '',
        ),
        array( // row #6
            'id' => 7,
            'name' => '匈牙利',
            'isback' => 1,
            'tax_comm' => 27.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'X',
            'py' => '',
        ),
        array( // row #7
            'id' => 8,
            'name' => '西班牙',
            'isback' => 1,
            'tax_comm' => 21.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'X',
            'py' => '',
        ),
        array( // row #8
            'id' => 9,
            'name' => '荷兰',
            'isback' => 1,
            'tax_comm' => 21.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'H',
            'py' => '',
        ),
        array( // row #9
            'id' => 10,
            'name' => '比利时',
            'isback' => 1,
            'tax_comm' => 21.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'B',
            'py' => '',
        ),
        array( // row #10
            'id' => 11,
            'name' => '希腊',
            'isback' => 1,
            'tax_comm' => 23.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'X',
            'py' => '',
        ),
        array( // row #11
            'id' => 12,
            'name' => '瑞士',
            'isback' => 1,
            'tax_comm' => 8.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'R',
            'py' => '',
        ),
        array( // row #12
            'id' => 13,
            'name' => '塞浦路斯',
            'isback' => 1,
            'tax_comm' => 19.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'S',
            'py' => '',
        ),
        array( // row #13
            'id' => 14,
            'name' => '捷克共和国',
            'isback' => 1,
            'tax_comm' => 21.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'J',
            'py' => '',
        ),
        array( // row #14
            'id' => 15,
            'name' => '丹麦',
            'isback' => 1,
            'tax_comm' => 25.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'D',
            'py' => '',
        ),
        array( // row #15
            'id' => 16,
            'name' => '爱沙尼亚',
            'isback' => 1,
            'tax_comm' => 20.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'A',
            'py' => '',
        ),
        array( // row #16
            'id' => 17,
            'name' => '芬兰',
            'isback' => 1,
            'tax_comm' => 24.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'F',
            'py' => '',
        ),
        array( // row #17
            'id' => 18,
            'name' => '拉脱维亚',
            'isback' => 1,
            'tax_comm' => 21.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'L',
            'py' => '',
        ),
        array( // row #18
            'id' => 19,
            'name' => '立陶宛',
            'isback' => 1,
            'tax_comm' => 21.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'L',
            'py' => '',
        ),
        array( // row #19
            'id' => 20,
            'name' => '挪威',
            'isback' => 1,
            'tax_comm' => 25.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'N',
            'py' => '',
        ),
        array( // row #20
            'id' => 21,
            'name' => '波兰',
            'isback' => 1,
            'tax_comm' => 25.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'B',
            'py' => '',
        ),
        array( // row #21
            'id' => 22,
            'name' => '葡萄牙',
            'isback' => 1,
            'tax_comm' => 23.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'P',
            'py' => '',
        ),
        array( // row #22
            'id' => 23,
            'name' => '斯洛文尼亚',
            'isback' => 1,
            'tax_comm' => 22.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'S',
            'py' => '',
        ),
        array( // row #23
            'id' => 24,
            'name' => '瑞典',
            'isback' => 1,
            'tax_comm' => 25.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'R',
            'py' => '',
        ),
        array( // row #24
            'id' => 25,
            'name' => '斯洛伐克',
            'isback' => 1,
            'tax_comm' => 20.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'S',
            'py' => '',
        ),
        array( // row #25
            'id' => 26,
            'name' => '卢森堡',
            'isback' => 1,
            'tax_comm' => 15.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'L',
            'py' => '',
        ),
        array( // row #26
            'id' => 27,
            'name' => '克罗地亚',
            'isback' => 1,
            'tax_comm' => 25.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'K',
            'py' => '',
        ),
        array( // row #27
            'id' => 28,
            'name' => '冰岛',
            'isback' => 1,
            'tax_comm' => 25.50,
            'tax_tsb' => 10.00,
            'pygroup' => 'B',
            'py' => '',
        ),
        array( // row #28
            'id' => 29,
            'name' => '爱尔兰',
            'isback' => 1,
            'tax_comm' => 23.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'A',
            'py' => '',
        ),
        array( // row #29
            'id' => 30,
            'name' => '土耳其',
            'isback' => 1,
            'tax_comm' => 20.00,
            'tax_tsb' => 10.00,
            'pygroup' => 'T',
            'py' => '',
        ),
        array( // row #30
            'id' => 31,
            'name' => '日本',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'R',
            'py' => '',
        ),
        array( // row #31
            'id' => 32,
            'name' => '泰国',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'T',
            'py' => '',
        ),
        array( // row #32
            'id' => 33,
            'name' => '新加坡',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'X',
            'py' => '',
        ),
        array( // row #33
            'id' => 34,
            'name' => '马来西亚',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'M',
            'py' => '',
        ),
        array( // row #34
            'id' => 35,
            'name' => '印度',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'Y',
            'py' => '',
        ),
        array( // row #35
            'id' => 36,
            'name' => '马尔代夫',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'M',
            'py' => '',
        ),
        array( // row #36
            'id' => 37,
            'name' => '斯里兰卡',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'S',
            'py' => '',
        ),
        array( // row #37
            'id' => 38,
            'name' => '澳门',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'A',
            'py' => '',
        ),
        array( // row #38
            'id' => 39,
            'name' => '印度尼西亚',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'Y',
            'py' => '',
        ),
        array( // row #39
            'id' => 40,
            'name' => '越南',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'Y',
            'py' => '',
        ),
        array( // row #40
            'id' => 41,
            'name' => '台湾',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'T',
            'py' => '',
        ),
        array( // row #41
            'id' => 42,
            'name' => '阿拉伯联合酋长国',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'A',
            'py' => '',
        ),
        array( // row #42
            'id' => 43,
            'name' => '香港',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'X',
            'py' => '',
        ),
        array( // row #43
            'id' => 44,
            'name' => '摩洛哥',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'M',
            'py' => '',
        ),
        array( // row #44
            'id' => 45,
            'name' => '埃及',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'A',
            'py' => '',
        ),
        array( // row #45
            'id' => 46,
            'name' => '俄罗斯',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'E',
            'py' => '',
        ),
        array( // row #46
            'id' => 47,
            'name' => '乌克兰',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'W',
            'py' => '',
        ),
        array( // row #47
            'id' => 48,
            'name' => '突尼斯',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'T',
            'py' => '',
        ),
        array( // row #48
            'id' => 49,
            'name' => '摩纳哥',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'M',
            'py' => '',
        ),
        array( // row #49
            'id' => 50,
            'name' => '梵蒂冈',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'Z',
            'py' => '',
        ),
        array( // row #50
            'id' => 51,
            'name' => '安道尔',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'A',
            'py' => '',
        ),
        array( // row #51
            'id' => 52,
            'name' => '马耳他',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'M',
            'py' => '',
        ),
        array( // row #52
            'id' => 53,
            'name' => '巴西',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'B',
            'py' => '',
        ),
        array( // row #53
            'id' => 54,
            'name' => '阿根廷',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'A',
            'py' => '',
        ),
        array( // row #54
            'id' => 55,
            'name' => '智利',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'Z',
            'py' => '',
        ),
        array( // row #55
            'id' => 56,
            'name' => '美国',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'M',
            'py' => '',
        ),
        array( // row #56
            'id' => 57,
            'name' => '加拿大',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'J',
            'py' => '',
        ),
        array( // row #57
            'id' => 58,
            'name' => '墨西哥',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'M',
            'py' => '',
        ),
        array( // row #58
            'id' => 59,
            'name' => '澳大利亚',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'A',
            'py' => '',
        ),
        array( // row #59
            'id' => 60,
            'name' => '新西兰',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'X',
            'py' => '',
        ),
        array( // row #60
            'id' => 61,
            'name' => '斐济共和国',
            'isback' => 0,
            'tax_comm' => 0.00,
            'tax_tsb' => 0.00,
            'pygroup' => 'Z',
            'py' => '',
        ),
    );
}
?>